Depending on the type of product you are using, the definitions of ‘Parameter’, ‘IO Logic’, ‘AxisStatus’, etc. may be different. This example is based on ‘Ezi-SERVO2’, so please apply the appropriate value depending on the product you are using.
Example)
FM_EZISERVO2_PARAM // Parameter enum when using 'Ezi-SERVO2'
FM_EZIMOTIONLINK2_PARAM // Parameter enum when using 'Ezi-MOTIONLINK2'
[EN]
1. Connect a device. 2. Configure the DAC value. 3. Read the DAC value.
4. Close connection.
[KR]
1. 장치 연결. 2. DAC 변환 값 설정. 3. DAC 변환 값 읽기. 4. 연결
해제.
unsigned char byChannel = 0; //Channel = 0
int bEnable = TRUE; //Enable = True
int lDACValue = 10000; //DAC Value = 10000
("---------------------------------- \n");
printf// Set DAC Value to 10000
if (FAS_SetDACValue(nBdID, byChannel, bEnable, lDACValue) != FMM_OK)
{
("Function(FAS_SetDACValue) was failed.\n");
printf}
[EN]
You can set the DAC conversion value using the FAS_SetDACValue()
function. Meaning of each argument is as follows sequentially: ‘ID
number of the board’, ‘channel number’, ‘whether to enable the DAC
function’, ‘DAC conversion value’
[KR]
FAS_SetDACValue() 함수를 사용하여 DAC 변환 값을 설정할 수 있습니다. 해당
함수의 각 인자는 순차적으로 다음을 의미합니다. ‘해당 보드의 ID번호’,
‘채널 번호’, ‘DAC 기능 활성화 여부’, ‘DAC 변환 값’
int bEnable = 0; //Enable
int lRecv = 0; //DAC Value
("---------------------------------- \n");
printf// Get DAC Value
if (FAS_GetDACValue(nBdID, 0, &bEnable, &lRecv) != FMM_OK)
{
("Function(FAS_GetDACValue) was failed.\n");
printf}
[EN]
You can read the DAC value using the FAS_GetDACValue() function. Meaning
of each argument is as follows sequentially: ‘ID number of the board’,
‘channel number’, ‘variable pointer to store whether the DAC function is
enabled’, ‘variable pointer to store the DAC value’
[KR]
FAS_GetDACValue() 함수를 사용하여 DAC 값을 읽어올 수 있습니다. 해당
함수의 각 인자는 순차적으로 다음을 의미합니다. ‘해당 보드의 ID번호’,
‘채널 번호’, ‘DAC 기능 활성화 여부를 저장할 변수 포인터’, ‘DAC 값을
저장할 변수 포인터’
[EN]
1. Please refer to the [01.ConnectionExam] project document for function
descriptions on connecting and disconnecting devices.
[KR]
1. 장치 연결 및 해제에 대한 함수 설명은 [01.ConnectionExam] 프로젝트
문서를 참고하시기 바랍니다.